A method called template matching is a method for detecting an object from an image. Basic processing of template matching includes preparing a model (template) of an object which is a detection target in advance and evaluating conformity of image features between an input image and the template to detect a position and a posture of the object within the image. The object detection according to template matching is used in various fields such as inspection and picking, robot vision and monitoring cameras in factory automation (FA). Recently, further enhancement of the speed of template matching is required due to increase in the resolution of images, increase in the number of types of detection objects, request for real-time processing for moving images, etc.
As a technology for increasing the speed of search processing according to template matching, an algorithm called coarse-to-fine search is known. Coarse-to-fine search is a method of repeating a process of preparing a group of images having gradually different resolutions (called an image pyramid) and searching high-resolution images with respect to a search range while narrowing the search range on the basis of search results in low-resolution images to finally specify a position of an object in the original resolution image. The number of collation operations can be reduced by narrowing the search range in stages and thus the entire processing time can be decreased.
In addition, single instruction multiple data (SIMD) is a technology for increasing the speed of operation processing using computers. SIMD is a kind of parallel processing of executing operations of multiple pieces of data through a single instruction. For example, in the case of a processor including a SIMD register having a width of 128 bits, operations for 8 pieces of 16-bit data or operations for 16 pieces of 8-bit data can be processed in parallel using an instruction of 1 clock. Patent Literature 1 discloses an example in which SIMD is applied in order to increase the speed of spatial filter operations. In addition, Non-Patent Literature 1 discloses a method of continuously arranging and storing a plurality of feature quantities arranged for every T pixels in a memory in order to apply SIMD to calculation of a response map (the term “streaming simd extension (SSE)” is disclosed in Non-Patent Literature 1 instead of SIMD).
Parallel processing according to SIMD is effective for increasing the speed of processing. However, the methods of Patent Literature 1 and Non-Patent Literature 1 are specialized for the processing disclosed in the literatures and cannot be applied to the aforementioned coarse-to-fine search.